Regarding the first subject, a shuffling method is one of high-efficient-coding methods for recording standard TV (SDTV) signals into a compressed-digital type video-cassette-recorder (VCR). This shuffling method unifies lengths of video signal data in a coding unit.
To be more specific, the shuffling method combines a plurality of blocks displayed apart from each other on a screen, thereby forming a segment, i.e. one unit of coding. As a result, correlations between data within a segment become loose, thereby preventing the data lengths in respective segments from being dispersed. This can prevent picture quality from being locally deteriorated.
The details of shuffling method depend on a number of sampling of input-digital-video signals, a recording rate, and the like.
For instance, when a SDTV signal is down-sampled to a 4:1:1 signal and recorded in 25 Mbps, one frame data is divided into 270 segments.
When a 4:2:2 signal is recorded, one frame data is divided into 540 segments.
On the other hand, a TV signal of higher quality than the SDTV or a TV signal of the progressive format has been recently recorded in 100 Mbps on trial. This method tries to double the recording rate since those signals have a higher data rate than that of the SDTV. In other words, a recorded rate is changed from a data rate of an input video signal, the methods discussed above cannot be used as they are, and they must be expanded or modified.
Regarding the second subject, FIG. 21 is a block diagram of a conventional video-signal-device relating to a control method of code-quantity. This prior art case is described under the following condition.
Two types of quantizers are used, and two quantizing numbers specifying quantizing steps are available, i.e. “0” and “1”. Respective quantizers are named “quantizer 0” and “quantizer 1” (not shown). The greater number has the smaller quantizing step-sizes.
When identical orthogonal-transformed-data undergo a quantizing and a variable length coding, a greater code-quantity is produced in quantizer 1 and a smaller code-quantity is produced in quantizer 0.
Each block has priority 0 and priority 1, and offset value 0, offset value 1 corresponding to priority 1, priority 0.
The conventional coding device is described with reference to FIG. 21.
Segment creator 91 divides an input video signal into blocks, e.g. a block formed of 8 pixels×8 lines, and forms a segment, which is a control unit of code-quantity, with 20 blocks. Each segment is fed into orthogonal transformer 92 and priority calculator 93.
Orthogonal transformer 92 provides each segment with an Orthogonal transforming process block by block, and outputs an orthogonal transform data which is supplied to priority calculator 93, coding section 94 including quantizer 0, coding section 95 including quantizer 1 and coding section 97.
Priority calculator 93 calculates priorities of each block based on the block data supplied and the block data after the orthogonal transforming, then sets priority 0 or priority 1.
The priorities of each block are fed into coding sections 94 and 95, quantizer determining section 96.
Coding sections 94 and 95 add offset values—determined by the priorities—to respective quantizing numbers (the resultant added value is limited by a maximum quantizing number), and quantize the orthogonal transformed data supplied.
In other words, when priority 0 is fed into quantizer 0, the quantizing number is set “0”, and when priority 1 is fed into quantizer 0, the quantizing number is set “1”. When priority 0 or 1 is fed into quantizer 1, quantizing number is set “1”, because the maximum quantizing number is “1”, and quantization is carried out. Then variable length coding is carried out before the code-quantity of the block is calculated. The same process is provided to 20 blocks of respective segments to extract code-quantity of each segment.
The code-quantity calculated in coding sections 94 and 95 are fed into quantizer determining section 96.
Quantizer determining section 96 selects a final quantizer dealing with the maximum code-quantity—not more than a target code-quantity—out of the code-quantities of coding sections 94 and 95. The quantizing number of the final quantizer is fed into coding section 97.
Coding section 97 quantizes the orthogonal transformed data with the final quantizer and an offset value determined by a priority, then provides a variable length coding process before outputting a coded data.
In the conventional coding device; however, when a block has a high priority, even a quantizer of the greatest step-size sometimes results in an overflow, i.e. the code-quantity produced in the segment exceeds a target code-quantity.
When an overflow is happened, not all the data are recorded and some of the data are discarded because code-quantity produced in the segment exceeds the code-quantity allotted to the segment.
The coded data in the segment are recorded in a recording medium following the priority order of blocks set in the segment. The data of high-priority blocks are thus entirely recorded; however the data of low-priority blocks are scarcely recorded in the medium.
Priorities of blocks having alternate-current (AC) coefficients exceeding a given value are set “1”, and all the AC coefficients of the blocks having priority “1” are divided by “2” so that data volume can be reduced. This method is effective for reducing data volume; however, the AC coefficients of blocks having priority 1 are always divided by “2”, i.e. even the quantizer having the smallest step-size is used, the AC coefficients are divided by “2”. Thus the code-quantity produced in the segment becomes so less than a target code-quantity that the code-quantity allotted to the segment cannot be efficiently used.
Regarding the third subject, FIG. 28 is a block diagram of a conventional hierarchical coding device for a video signal, and FIG. 29 is a block diagram of a conventional hierarchical decoding device for a video signal.
In FIG. 28, an input video signal is converted by format converter 1001 into a video signal of lower resolution.
Motion detector 1002 records a video signal supplied from converter 1001 into picture memory 1003. Further, detector 1002 detects a motion of each macro-block (a block formed of 16 pixels×16 lines of luminance signal in a screen) by using a coding frame, a reference frame stored in picture memory 1003 and a video signal of a reference frame already coded and decoded.
Motion compensating (MC) device 1004 outputs each differential signal of respective macro-blocks, the differential signal being derived between a video signal of a coded frame and a video signal of the reference frame detected by detector 1002.
Discrete-cosine-transform (DCT) device 1005 provides DCT process to a differential signal in each block (8 pixels×8 lines on the screen) of the output signal supplied from motion compensating device 1004.
Quantizer (Q) 1006 quantizes a DCT coefficient.
Inverse-quantizer (IQ) 1007 inversely quantizes the coefficient quantized by quantizer 1006.
Inverse discrete-cosine-transform (IDCT) device 1008 provides the output from inverse-quantizer 1007 with IDCT process.
Motion compensating (MC) device 1009 adds a decoded video signal of a reference frame to the output from IDCT device 1008, thereby generating a decoded video signal, and stores the signal in picture memory 1003. The reference frame is compensated its motion by compensating device 1004.
Variable length coding (VLC) device 1010 provides an output of quantizer 1006 and a given flag including a motion vector with variable length coding process.
Second format converter 1011 converts the decoded video signal—an output from motion compensating device 1009—into a signal of the same resolution as the input video signal, and stores the signal into picture memory 1013.
Motion detector 1012 records the input video signal into picture memory 1013. Detector 1012 detects a motion of each macro-block by using a coding frame, a reference frame stored in picture memory 1013, a video signal of the reference frame already coded and decoded and another reference frame. This another reference frame is a video signal on the same timing of the low-resolution signal, i.e. an output from second format converter 1011.
Motion compensating (MC) device 1014 outputs each differential signal of respective macro-blocks, the differential signal being derived between a video signal of a coded frame and a video signal of a reference frame detected by motion detector 1012.
Discrete-cosine-transform (DCT) device 1015 provides DCT process to a differential signal in each block of the output signal supplied from motion compensating (MC) device 1019.
Quantizer (Q) 1016 quantizes a DCT coefficient.
Inverse-quantizer (IQ) 1017 inversely quantizes the coefficient quantized by quantizer 1016.
Inverse discrete-cosine-transform (IDCT) device 1018 provides the output from inverse-quantizer 1017 with IDCT process.
Motion compensating device 1019 adds a decoded video signal of a reference frame to the output from IDCT device 1018, thereby generating a decoded video signal, and stores the signal in picture memory 1013. The reference frame is compensated its motion by compensating device 1014.
Variable length coding (VLC) device 1020 provides an output of quantizer 1016 and a given flag including a motion vector with variable length coding process before outputting them.
In FIG. 29, variable length decoder (VLD) 1021 receives a first stream of compressed video signals, and decodes the stream in a given manner then outputs a motion vector and the decoded signal.
Inverse-quantizer (IQ) 1022 provides the decoded signal with inverse quantizing process following the given steps, and outputs a DCT coefficient. IDCT device 1023 provides the DCT coefficient with IDCT process. Motion compensating (MC) device 1024 adds a decoded video signal of a reference frame specified by the motion vector to the output from IDCT device 1023, thereby generating a decoded video signal, and stores the signal in picture memory 1025.
Second format converter 1026 converts the format of a video signal and stores it into picture memory 1031.
Variable length decoder (VLD) 1027 receives a second stream of compressed video signals, and decodes the stream in a given manner then outputs a motion vector (MV) and the decoded signal. Inverse-quantizer (IQ) 1028 provides the decoded signal with inverse quantizating process following the given steps, and outputs a DCT coefficient. IDCT device 1029 provides the DCT coefficient with IDCT process. Motion compensating (MC) device 1030 adds a decoded video signal of a reference frame specified by the motion vector to the output from IDCT device 1029, thereby generating a decoded video signal, and stores the signal in picture memory 1031.
In the conventional coding device discussed above; however has the following problems: (1) Two motion detectors are used, and this complicates the structure of the coding device. (2) Since both of the first stream and the second stream of the compressed video signals include motion vectors, the streams are obliged to have redundancy. (3) The input video signals are in a segment different from that of the low resolution signals on a screen. Thus distortions are crossed and become more conspicuous.